package com.youlu.campus.service.platform;

import com.youlu.campus.entity.AIPointPlatformConfig;
import com.youlu.campus.entity.PointPlatformConfig;
import com.youlu.campus.entity.PointPlatformConfigQueryVO;
import com.youlu.campus.entity.UserPO;
import com.youlu.campus.entity.VO.res.CsQQOpenIdRes;
import com.youlu.campus.entity.VO.res.PlatformInfoVO;
import org.springframework.data.domain.Page;

public interface PointPlatformConfigService {

    PointPlatformConfig findOne(String id);

    PointPlatformConfig find(String appId);

    PointPlatformConfig find();

    boolean update(PointPlatformConfig req);

    /**
     * 获取所需积分
     * invite:邀请,ad:看广告,sign-up:签到,share-mini:分享小程序,
     * * recieve-paper-ca:领取纸质版,recieve-digit-ca:领取电子版
     *
     * @param bizType
     * @return
     */
    Integer getPoint(String bizType);

    /**
     * 获取所需积分
     * invite:邀请,ad:看广告,sign-up:签到,share-mini:分享小程序,
     * * recieve-paper-ca:领取纸质版,recieve-digit-ca:领取电子版
     *
     * @param bizType
     * @return
     */
    Integer getPoint(String appId, String bizType);

    /**
     * 列表
     *
     * @param req
     * @return
     */
    Page<PointPlatformConfig> list(PointPlatformConfigQueryVO req);

    /**
     * 新增
     *
     * @param req
     * @return
     */
    boolean create(PointPlatformConfig req);

    boolean delete(String id);

    String[] findCsByAppIdAndPlatform(String appId, String platform);

    CsQQOpenIdRes findCsByAppIdAndPlatform_V2(String appId, String platform);


    PlatformInfoVO findByAppId(UserPO currentUser, String appId);

    /**
     * 获取AI平台配置
     *
     * @return
     */
    public AIPointPlatformConfig findAIPlatformConfig();
}
